package com.unitd.scheduler.monitor;

import java.io.Serializable;

/**
 * @desc Job任务的命令监控信息定义类
 * @filename MonitorCommond.java
 * @copyright www.unitd.com
 * @author Hudan
 * @version 1.0
 * @date 2016/10/16
 */
public class MonitorCommond implements Serializable {

	/** 执行定时任务 */
	public final static byte TYPE_EXEC = 0x01;
	/** 开停状态修改 */
	public final static byte TYPE_STATUS_MOD = 0x02;
	/** 执行时间策略修改 */
	public final static byte TYPE_CRON_MOD = 0x03;

	/** 命令类型 */
	private byte cmdType;
	/** Job所在组 */
	private String jobGroup;
	/** Job名称 */
	private String jobName;
	/** Job对应的数据对象 */
	private Object body;

	public MonitorCommond() {
	}

	public MonitorCommond(byte cmdType, String jobGroup, String jobName, Object body) {
		super();
		this.cmdType = cmdType;
		this.jobGroup = jobGroup;
		this.jobName = jobName;
		this.body = body;
	}

	public byte getCmdType() {
		return cmdType;
	}

	public void setCmdType(byte cmdType) {
		this.cmdType = cmdType;
	}

	public String getJobGroup() {
		return jobGroup;
	}

	public void setJobGroup(String jobGroup) {
		this.jobGroup = jobGroup;
	}

	public String getJobName() {
		return jobName;
	}

	public void setJobName(String jobName) {
		this.jobName = jobName;
	}

	public Object getBody() {
		return body;
	}

	public void setBody(Object body) {
		this.body = body;
	}

	@Override
	public String toString() {
		return "MonitorCommond [cmdType=" + cmdType + ", jobGroup=" + jobGroup + ", jobName=" + jobName + "]";
	}
}